import React from 'react'
import { Swiper } from 'antd-mobile'
import { useLoaderData } from 'react-router-dom'

function Index() {
    const { lists } = useLoaderData()
    return (
        <div>
            <Swiper autoplay>
                {
                    lists.map((item, index) => {
                        return <Swiper.Item key={index}>
                            <img style={{ width: '100%', height: '200px' }} src={item.image} alt="" />
                        </Swiper.Item>
                    })
                }
            </Swiper>
        </div>
    )
}

export default Index
